package br.com.firula.to;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="gol")
@SequenceGenerator(name="SEQUENCE", sequenceName="gol_seq")
@Inheritance(strategy=InheritanceType.JOINED)
public class GolTO extends BaseTO{

	private static final long serialVersionUID = -3345081135652141592L;

	@Id
	@Column(name="id", nullable=false)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;

	@Column(name="tempo", nullable=false)
	private Integer tempo;

	@Column(name="data", nullable=false)
	private Date data;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idJogador", nullable = false)
	private JogadorTO jogador;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getTempo() {
		return tempo;
	}

	public void setTempo(Integer tempo) {
		this.tempo = tempo;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	public JogadorTO getJogador() {
		return jogador;
	}

	public void setJogador(JogadorTO jogador) {
		this.jogador = jogador;
	}

	@Override
	public String getAbreviation() {
		// TODO Auto-generated method stub
		return null;
	}

}
